const search = {
  namespaced: true,
  state() {
    return {
      //  搜索历史
      historySearch: JSON.parse(window.localStorage.getItem("search")) || [],
    };
  },
  mutations: {
    //删除历史搜索记录条
    handleDeleteItem(state, value) {
      state.historySearch.splice(value, 1);
    },
    //删除历史搜索记录条
    handleDeleteAll(state) {
      state.historySearch = [];
    },
  },
};
export default search;
